<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<head>
    <title>学生信息</title>
    <script src="js/jquery.min.js"></script>
    <style>
        div {
            width: 340px;
            height: 500px;
            margin: 50px auto;
            border: 1px solid #000;
            text-align: center;
        }

        table, th, td {
            width: 300px;
            height: 50px;
            border: 1px solid #ccc;
            border-collapse: collapse;
            margin: 0 auto;
            text-align: center;
        }

        input[type="button"] {
            width: 100px;
        }

    </style>
</head>
<body>
<div>
    <h3>学生详细信息</h3>
    <table>
        <tr>
            <td>姓名</td>
            <td>${student.name}</td>
        </tr>
        <tr>
            <td>学号</td>
            <td>${student.sno}</td>
        </tr>
        <tr>
            <td>性别</td>
            <td>
                <c:if test="${student.sex==1}">男</c:if>
                <c:if test="${student.sex==0}">女</c:if>
            </td>
        </tr>
        <tr>
            <td>出生日期</td>
            <td><fmt:formatDate value="${student.birthday}" pattern="yyyy-MM-dd"/></td>

        </tr>
        <tr>
            <td>政治面貌</td>
            <td>
                <c:if test="${student.polity==1}">党员</c:if>
                <c:if test="${student.polity==2}">团员</c:if>
                <c:if test="${student.polity==3}">无党派</c:if>
                <c:if test="${student.polity==4}">其它</c:if>
            </td>
        </tr>
        <tr>
            <td>简介</td>
            <td>${student.brief}</td>
        </tr>
    </table>
    <br>
    <br>
    <input type="button" value="返回" id="btnBack">
</div>

<script>
    $(function () {
        let btnBack = $("#btnBack");
        btnBack.click(function () {
            window.history.go(-1);
        });
    });
</script>
</body>
</html>

